{% extends "pages.html" %}
{% load humanize %}
{% load custom %}
{% block subTitle %}{{usernamePage}}'s activity{% endblock %}
{% block pagebody %}
<div class="page">
<div class="head">
	<a target="_top" href="/" title="{{site_name}} Home | Popular Pages"><img class="logo" src="/images/logo.png"></a>
	<h1 style="padding-top: 40px;">{{usernamePage}}'s activity</h1>
	<div style='clear:both;'></div>
</div>

<table class="scores">
<tr><th></th><th>Title</th><th>Shared</th><th>Viewed</th><th>Comments</th><th>Created</th><th>Scores</th></tr>
{% for comment in comments %}
	<tr>
		<td style="width:18px;"><span style="display:none;" class="Snap_Shot_URL">{{comment.map.url|escape}}</span></td>
		<td>
			<a href="/{{comment.map.GetId}}" title="{{comment.map.url|escape}}">{{comment.map.title|escape}}</a>
		{% if comment.comment or comment.tags %}<div class="comments"><p>
			{% ifequal comment.comment "__share" %}<i>Shared</i>{% else %}{{comment.comment|escape|urlize}}{% endifequal %}
			{% if comment.tags %}
	    		[{% for tag in comment.TagList %}<a target="_top" href="/tag/{{tag}}">{{tag|escape}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}]
	    	{% endif %}
	    	- <i>{{ comment.dateCreated|Age }}</i>
	    	</p></div>
	    {% endif %}
		</td>
		<td class="num">{{comment.map.shareCount|intcomma}}</td>
		<td class="num">{{comment.map.viewCount|intcomma}}</td>
		<td class="num">{{comment.map.CommentCount|intcomma}}</td>
		<td class="age">{{comment.map.dateCreated|Age}}
			{% if comment.map.Creator %}
				by <a href="/user/{{comment.map.Creator}}">{{comment.map.Creator}}</a>
			{% endif %}
		</td>
		<td class="bar"><div class="bar" bar_value="{{comment.map.ScoresNamed.day|mult:24|floatformat:1}}"
			title="{{comment.map.ScoresNamed.day|mult:24|floatformat:1}} points per day">&nbsp;</div></td>
	</tr>
{% endfor %}
</table>
{% endblock %}
